package com.wh.system.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.wh.system.pojo.Permission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface PermissionDao extends BaseMapper<Permission> {
    List<Permission> findByPage(@Param("page") IPage<Permission> page, @Param("qw") QueryWrapper<Permission> qw);
    List<Long> findPermissionIdsByRoleId(Long roleId);

    List<String> getPermissionsByLogininfoId(Long id);
}
